---
title: Multiple Languages Simultaneously
description: Multiple Languages Simultaneously | Transloco Angular i18n
---

There are times you may need to use a different language in a specific part of the template, or in a particular component or module. This can be achieved in a similar way to the previous example, except here set the `TRANSLOCO_LANG` provider either in lazy module providers list, the component providers or in the template.

Here's an example of setting it in a component's providers:

```ts {6,7} title="my-comp.component.ts"
@Component({
  selector: 'my-comp',
  templateUrl: './my-comp.component.html',
  providers: [
    {
      provide: TRANSLOCO_LANG,
      useValue: 'es'
    }
  ]
})
export class MyComponent {}
```

Using Angular's DI rules, this will ensure that the language in this component's template and all of its children's templates is `es`.

Alternatively, here is how to use it directly in the template:

```html {1} title="my-comp.component.html"
<ng-container *transloco="let t; lang: 'en'">
  <p>Inline (en) wins: {{ t('home') }}</p>
</ng-container>
```

Note that it will be used as the **initial** language. If you need it to be _static_, you can use the `static` pipe:

```ts {7} title="my-comp.component.ts"
@Component({
  selector: 'my-comp',
  templateUrl: './my-comp.component.html',
  providers: [
    {
      provide: TRANSLOCO_LANG,
      useValue: 'es|static'
    }
  ]
})
export class MyComponent {}
```

Or in the template:

```html title="my-comp.component.html"
// Define the lang dynamically in the component
<ng-container *transloco="let t; lang: someVariable">

// Or pass it as inline string
<ng-container *transloco="let t; lang: 'es|static'">
  <p>Inline (es) wins and stays: {{ t('home') }}</p>
</ng-container>
```
